package com.chinaoct.siku.LocalStorage.service;

import com.chinaoct.siku.LocalStorage.dao.StorageDTO;
import com.chinaoct.siku.LocalStorage.dao.StorageVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

public interface StorageService {

    StorageDTO create(String name, File file,String fileName,Integer storageType,String source);

    /**
     * 编辑
     * @param resources 文件信息
     */
    void update(StorageDTO resources);

    /**
     * 根据realName查询
     * @param realName
     * @return
     */
    StorageDTO findByRealName(String realName);

    StorageDTO saveFile(String name,String sourceType, MultipartFile file);

    boolean deleteById(Long id);

    StorageVO changeToStorageVO(StorageDTO storage);
}
